Repository navigation
Conversation
HashNuke
added a commit
to HashNuke/vxpipe
that referenced
this pull request
Dec 2, 2026
Pin the feature branch for elixir-nx/ortex#58 and retire the local Ortex patches. Use Ortex.run/2 for scalar and batched inference, size the worker pool against dirty I/O schedulers, and keep the one-thread ONNX session limit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello there,
I reviewed this PR manually. This PR was authored with the help of a coding agent.
I've been building a voice agent platform in Elixir and it uses Silero VAD. I've been running some benchmarks to optimize and this intra-op threads configuration came up. I've added the ability to configure this without changing the default behaviour of the library.
Notes below, including instructions to reproduce. I've pushed the benchmarking instructions to a separate branch on my fork. Looks like in a smaller docker container, assigning the number of intra-op threads explicitly to 1, results in better performance than leaving it to auto-assign.
Description
Applications running many small inferences concurrently can already keep their CPUs busy across streams. In that case, using extra threads within each operator can cost more CPU and delay results. This change lets the application choose a limit for each model session.
Usage
The optional fourth argument controls intra-op parallelism. Omitting it or passing
0keeps automatic threading. The third argument remains the graph optimization level.Benchmark
25 concurrent Silero VAD streams shared one session and processed the same 3.3-second WAV every trial. Each round sent one 32 ms audio frame per stream. We ran six pairs of fresh Docker containers on four logical CPUs with 2 GiB RAM each, alternating which setting ran first.
One thread used less CPU and had lower p95 latency in all six pairs, with identical speech probabilities. These timings cover Silero inference on this host. Benchmark code, audio and raw measurements
Reproduce
On Linux x86-64 with four logical CPUs, Docker BuildKit, cgroup v2 and Python 3:
The Dockerfile builds the feature branch. The runner prints both settings' medians and writes each trial to
my-results/trials.jsonl.